<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>叠放次序</title>
    <style>
        div {
            position: relative;
            float: left;
            width: 100px;
            height: 200px;
            border: 1px solid black;
            margin-left: -1px;
        }

        div:hover {
            z-index: 1;
            border-color: red;
        }
    </style>
</head>

<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</body>

</html>